<?php /* Smarty version 2.6.14, created on 2012-10-20 20:06:19
         compiled from user_he_avatar.tpl */
?><?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'counter', 'user_he_avatar.tpl', 73, false),)), $this);
?><?php
SELanguage::_preload_multi(762,763,769,690701020,713,690701001,690701002,690701003,690701021,290,690701004,690701005,690701006,690701007,690701022,690701008);
SELanguage::load();
?>

<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'header.tpl', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 
 $this->assign('avatar_width', $this->_tpl_vars['user']->level_info['level_photo_width']); 
 $this->assign('avatar_height', $this->_tpl_vars['user']->level_info['level_photo_height']); ?>

<script type="text/javascript">

window.addEvent('domready', function() {
	he_avatar_choose.construct();

	<?php if ($this->_tpl_vars['he_avatar_crop']): ?>
	he_avatar.avatar_width = <?php echo $this->_tpl_vars['avatar_width']; ?>
;
	he_avatar.avatar_height = <?php echo $this->_tpl_vars['avatar_height']; ?>
;
	he_avatar.construct('<?php echo $this->_tpl_vars['crop_photo']; ?>
');
	<?php else: ?>
		he_avatar.construct_no_crop('<?php echo $this->_tpl_vars['crop_photo']; ?>
');
	<?php endif; ?>
});

</script>

<table class='tabs' cellpadding='0' cellspacing='0'>
<tr>
<td class='tab0'>&nbsp;</td>
<?php unset($this->_sections['cat_loop']);
$this->_sections['cat_loop']['name'] = 'cat_loop';
$this->_sections['cat_loop']['loop'] = is_array($_loop=$this->_tpl_vars['cats']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['cat_loop']['show'] = true;
$this->_sections['cat_loop']['max'] = $this->_sections['cat_loop']['loop'];
$this->_sections['cat_loop']['step'] = 1;
$this->_sections['cat_loop']['start'] = $this->_sections['cat_loop']['step'] > 0 ? 0 : $this->_sections['cat_loop']['loop']-1;
if ($this->_sections['cat_loop']['show']) {
    $this->_sections['cat_loop']['total'] = $this->_sections['cat_loop']['loop'];
    if ($this->_sections['cat_loop']['total'] == 0)
        $this->_sections['cat_loop']['show'] = false;
} else
    $this->_sections['cat_loop']['total'] = 0;
if ($this->_sections['cat_loop']['show']):

            for ($this->_sections['cat_loop']['index'] = $this->_sections['cat_loop']['start'], $this->_sections['cat_loop']['iteration'] = 1;
                 $this->_sections['cat_loop']['iteration'] <= $this->_sections['cat_loop']['total'];
                 $this->_sections['cat_loop']['index'] += $this->_sections['cat_loop']['step'], $this->_sections['cat_loop']['iteration']++):
$this->_sections['cat_loop']['rownum'] = $this->_sections['cat_loop']['iteration'];
$this->_sections['cat_loop']['index_prev'] = $this->_sections['cat_loop']['index'] - $this->_sections['cat_loop']['step'];
$this->_sections['cat_loop']['index_next'] = $this->_sections['cat_loop']['index'] + $this->_sections['cat_loop']['step'];
$this->_sections['cat_loop']['first']      = ($this->_sections['cat_loop']['iteration'] == 1);
$this->_sections['cat_loop']['last']       = ($this->_sections['cat_loop']['iteration'] == $this->_sections['cat_loop']['total']);
?>
  <td class='tab2' NOWRAP><a href='user_editprofile.php?cat_id=<?php echo $this->_tpl_vars['cats'][$this->_sections['cat_loop']['index']]['subcat_id']; ?>
'><?php echo SELanguage::_get($this->_tpl_vars['cats'][$this->_sections['cat_loop']['index']]['subcat_title']); ?></a></td><td class='tab'>&nbsp;</td>
<?php endfor; endif; 
 if ($this->_tpl_vars['user']->level_info['level_photo_allow'] != 0): ?><td class='tab1' NOWRAP><a href='user_editprofile_photo.php'><?php echo SELanguage::_get(762); ?></a></td><td class='tab'>&nbsp;</td><?php endif; 
 if ($this->_tpl_vars['user']->level_info['level_profile_style'] != 0 || $this->_tpl_vars['user']->level_info['level_profile_style_sample'] != 0): ?><td class='tab2' NOWRAP><a href='user_editprofile_style.php'><?php echo SELanguage::_get(763); ?></a></td><?php endif; ?>
<td class='tab3'>&nbsp;</td>
</tr>
</table>

<img src='./images/icons/editprofile48.gif' border='0' class='icon_big' />
<div class='page_header'><?php echo SELanguage::_get(769); ?></div>
<div class="clear"></div>
<br /><br />

<div class="he_avatar">

<div class="avatars">
	<div class="photo_upload">
		<div class="header"><?php echo SELanguage::_get(690701020); ?></div>
		<div class="portal_content" style="height: 105px;">
			<div class="user_thumb">
				<img src='<?php echo $this->_tpl_vars['user']->user_photo("./images/nophoto.gif"); ?>
' class='photo' width='100' height='100' border='0' alt='' />
			</div>
			<div class="description">
				<?php echo SELanguage::_get(713); ?>
			</div>
		</div>
	</div>
	<div class="choose_avatar">
		<div class="header"><?php echo SELanguage::_get(690701001); ?></div>
		<div class="portal_content" style="height: 105px;">
			<table>
				<tr>
					<td align="right" width="10%">
						<a href="javascript://" id="choose_avatar_back"><img border="0" src="./images/icons/arrow_back.gif"/></a>
					</td>
					<td>
						<div style="width: 430px">
						<div class="avatar_slider" id="avatar_slider">
						<?php $_from = $this->_tpl_vars['avatars']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['avatars'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['avatars']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['avatar']):
        $this->_foreach['avatars']['iteration']++;
?>
							<?php $this->assign('show_block', ($this->_foreach['avatars']['iteration'] <= 1)); ?>
							<?php echo smarty_function_counter(array('assign' => 'avatar_count'), $this);?>

							<?php if ($this->_tpl_vars['avatar_count']%6 == 1): ?><div class="avatars_block <?php if ($this->_tpl_vars['show_block']): ?>active_block<?php endif; ?>"><?php endif; ?>
								<img id="avatar_<?php echo $this->_tpl_vars['avatar']['id']; ?>
" class="select_avatar" src="./uploads_admin/avatar/<?php echo $this->_tpl_vars['avatar']['filename']; ?>
" border="0" height="60" width="60"/>
							<?php if ($this->_tpl_vars['avatar_count']%6 == 0): ?></div><?php endif; ?>
						<?php endforeach; endif; unset($_from); ?>
						<?php if ($this->_tpl_vars['avatar_count']%6 != 0): ?></div><?php endif; ?>
						<div style="clear: both;"></div>
						</div>
					</td>
					<td align="left" width="10%">
						<a href="javascript://" id="choose_avatar_next"><img border="0" src="./images/icons/arrow_next.gif"/></a>
					</td>
			</tr>
			<tr>
				<td colspan="3" align="center">
				<form method="post">
					<input type="hidden" name="task" value="choose_avatar"/>
					<input type="hidden" name="avatar_id" id="choosen_avatar_id"/>
					<input class="button" id="choose_selected" type="button" value="<?php echo SELanguage::_get(690701002); ?>"/>
				</form>
				</td>
			</tr>
			</table>
		</div>
	</div>
	<div style="clear: both;"></div>
</div>
<br/>
<div class="photo_crop">
	<div class="header"><?php echo SELanguage::_get(690701003); ?></div>
	<div class="portal_content">
		<b><?php echo SELanguage::_get(690701021); ?></b><br/>
		<div>
			<form method="post" enctype="multipart/form-data">
			<?php echo SELanguage::_get(290); ?>&nbsp;&nbsp;&nbsp;&nbsp;
				<input type="file" name="avatar_file" onchange="this.form.submit();"/>
				<input type="hidden" name="task" value="photo_for_crop"/>
			</form>
		</div><br /><br />
		<?php if ($this->_tpl_vars['crop_photo']): ?>
			<div><?php echo SELanguage::_get(690701004); ?></div>
			<div class="photo_block" id="photo_block"></div>
			<div class="he_preview_cont">
			<?php if ($this->_tpl_vars['he_avatar_crop']): ?>
				<div class="user_thumb" style="width:<?php echo $this->_tpl_vars['avatar_width']; ?>
px; height:<?php echo $this->_tpl_vars['avatar_height']; ?>
px;">
					<div class="preview_block" id="preview_block" style="width:<?php echo $this->_tpl_vars['avatar_width']; ?>
px; height:<?php echo $this->_tpl_vars['avatar_height']; ?>
px;"></div>
				</div>
				<div class="description" style="padding-left: <?php echo $this->_tpl_vars['avatar_width']+15; ?>
px;">
					<b><?php echo SELanguage::_get(690701005); ?></b><br/>
					<div><?php echo SELanguage::_get(690701006); ?></div>
					<form method="post">
						<input type="hidden" name="left" id="avatar_left"/>
						<input type="hidden" name="top" id="avatar_top"/>
						<input type="hidden" name="height" id="avatar_height"/>
						<input type="hidden" name="width" id="avatar_width"/>
						
						<input type="hidden" name="task" value="crop_avatar"/>						
						<input type="button" class="button" id="crop_avatar_btn" value="<?php echo SELanguage::_get(690701007); ?>"/>
					</form>
				</div>
				<div class="clr"></div>
			<?php else: ?>
				<form method="post">
					<input type="hidden" name="task" value="no_crop_save"/>				
					<center><input type="submit" class="button" value="<?php echo SELanguage::_get(690701022); ?>"/></center>
				</form>
			<?php endif; ?>
			</div>
		<?php else: ?>
			<?php echo SELanguage::_get(690701008); ?>
		<?php endif; ?>
	</div>
</div>

</div>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'footer.tpl', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>